package com.cn.serverline.lineicp.productionLine.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * 工序物料异常枚举
 *
 * @author Gmr
 * @since 2024/7/31
 */
@Getter
public enum ProcessMaterialsException implements AbstractExceptionEnum {

	MATERIAL_TYPE_NON_EXISTENT(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "01", "物料类型不存在"),
	NUMBER_UNIT_NON_EXISTENT(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "02", "数量单位不存在"),
	PRODUCTION_PROCESSES_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "03", "工序不存在"),
	ID_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "04", "ID不能为空"),
	PROCESS_MATERIALS_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "04", "目标对象不存在");

	/**
	 * 异常编码
	 */
	private final String errorCode;

	/**
	 * 异常提示
	 */
	private final String userTip;

	ProcessMaterialsException(String errorCode, String userTip) {
		this.errorCode = errorCode;
		this.userTip = userTip;
	}
}
